import {RoutesInterface} from "@/interface/routesInterface";
import {Router} from "express";
import CurriculumsController from "@/controllers/CurriculumController";

export default class curriculumsRoutes implements RoutesInterface {
    path: string = '/curriculum';
    router: Router = Router();
    CurriculumsController:CurriculumsController;
    constructor() {
        this.CurriculumsController=new CurriculumsController()
        this.initCurriculumsRoute()
    }
    private initCurriculumsRoute(){

        /**
         * 新增课程
         */
        this.router.post(`${this.path}`,this.CurriculumsController.createCurriculum)
        /**
         * 删除课程
         */
        this.router.delete(`${this.path}`,this.CurriculumsController.deleteCurriculum)
        /**
         * 更新课程
         */
        this.router.put(`${this.path}`,this.CurriculumsController.updateCurriculum)
        /**
         * 查找课程
         */
        this.router.get(this.path,this.CurriculumsController.getCurriculum);


    }

}